package com.csii.user.controller;

import com.csii.core.api.Result;
import com.csii.core.system.vo.SysUserCacheInfo;
import com.csii.user.service.ISysUserService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description 对外接口，无需权限验证
 * @Date 2021/4/12 15:49
 * @Created by Ian
 * @Contact: 19107614@qq.com
 */
@RestController
@RequestMapping("/api")
public class ApiController {
    @Autowired
    private ISysUserService sysUserService;

    @ApiOperation(value = "获取缓存用户信息")
    @RequestMapping(value = {"/getCacheUser"}, method = RequestMethod.GET)
    public Result<SysUserCacheInfo> getCacheUser(String username) {
        return Result.ok(sysUserService.getCacheUser(username));
    }
}
